# coding=utf-8
from django.http import HttpResponse,HttpResponseRedirect
from django.shortcuts import render_to_response

from django.core import serializers
from django.utils import simplejson
from django.template import Template
from django.template import Context

from google.appengine.api import users
from google.appengine.ext import db

from blog.models import Category
from blog.models import Diary
from blog.models import Tag
from blog.models import Comment
from link.models import Link

def index(request):
	if request.method == 'GET':
		login_user = users.get_current_user()
		login_url = users.create_login_url(request.get_full_path())
		is_user_admin = users.is_current_user_admin()
		logout_url = users.create_logout_url(request.get_full_path())

		context = {'mod':'resume',
				   'login_url':login_url,
				   'logout_url':logout_url,
				   'login_user':login_user,
				   'is_user_admin':is_user_admin,}
		return render_to_response('resume/index.html', context)
